package com.yft.entity.posinformation;

import com.yft.entity.base.BaseEntity;
import com.yft.enumeration.PosPattern;
import com.yft.enumeration.PosStatus;

import javax.persistence.*;
import java.util.Date;

/**
 * pos表
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = false, dynamicInsert = true)
@Table(name = "pos_machine")
public class PosMachine extends BaseEntity{

    private static final long serialVersionUID = 3427594597869453964L;
    /**
     * 主键
     */
    @Id
	@GeneratedValue
	@Column
	private Integer machineId;

    /**
     * 入库时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    private Date putInTime;

    /**
	 * 商户名
	 */
	@Column(length = 60)
	private String merchantName;

    /**
     * 商户实体
     */





    /**
     * 终端序列号
     */
    @Column(length = 60)
    private String machineSnCode;

    /**
     * 终端号（第三方支付提供的编号）
     */
    @Column(length = 60)
    private String terminalSn;

    /**
     * 密码键盘号
     */
    @Column(length = 60)
    private String passwordKeySn;

    /**
     * 移动终端sim卡编号
     */
    @Column(length = 60)
    private String simSn;

    /**
     * pos机型
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    private PosModel posModel;

    /**
     * pos机型主键
     */
    @Column(nullable = false)
    private Integer posModelId;

    /**
     * 机型(如 移动 拨号等）
     */
    @Enumerated(EnumType.STRING)
    @Column(length = 40,nullable = false)
    private PosPattern pattern;

    /**
     * 型号
     */
    @Column(length = 60,nullable = false)
    private String modelName;

    /**
     * 进货渠道名字
     */
    @Column(length = 40,nullable = false)
    private String channelName;

    /**
     * pos业务类型
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn
    private PosBusinessType posBusinessType;

    /**
     * 业务类型主键
     */
    @Column
    private Integer posBusinessTypeId;

    /**
     * 业务类型名称
     */
    @Column(length = 40)
    private String typeName;

    /**
     * 是否回收(默认 0）
     */
    @Column
    private Integer isRecycle;

    /**
     * pos机状态
     */
    @Enumerated(EnumType.STRING)
    @Column(length = 40,nullable = false)
    private PosStatus posStatus;

    /**
     * 通过名称模糊查询
     */
    @Transient
    private String se_channelName;

    public Integer getMachineId() {
        return machineId;
    }

    public void setMachineId(Integer machineId) {
        this.machineId = machineId;
    }

    public Date getPutInTime() {
        return putInTime;
    }

    public void setPutInTime(Date putInTime) {
        this.putInTime = putInTime;
    }

    public PosPattern getPattern() {
        return pattern;
    }

    public void setPattern(PosPattern pattern) {
        this.pattern = pattern;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getMachineSnCode() {
        return machineSnCode;
    }

    public void setMachineSnCode(String machineSnCode) {
        this.machineSnCode = machineSnCode;
    }

    public String getTerminalSn() {
        return terminalSn;
    }

    public void setTerminalSn(String terminalSn) {
        this.terminalSn = terminalSn;
    }

    public String getPasswordKeySn() {
        return passwordKeySn;
    }

    public void setPasswordKeySn(String passwordKeySn) {
        this.passwordKeySn = passwordKeySn;
    }

    public String getSimSn() {
        return simSn;
    }

    public void setSimSn(String simSn) {
        this.simSn = simSn;
    }

    public PosModel getPosModel() {
        return posModel;
    }

    public void setPosModel(PosModel posModel) {
        this.posModel = posModel;
    }

    public Integer getPosModelId() {
        return posModelId;
    }

    public void setPosModelId(Integer posModelId) {
        this.posModelId = posModelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Integer getIsRecycle() {
        return isRecycle;
    }

    public void setIsRecycle(Integer isRecycle) {
        this.isRecycle = isRecycle;
    }

    public PosStatus getPosStatus() {
        return posStatus;
    }

    public void setPosStatus(PosStatus posStatus) {
        this.posStatus = posStatus;
    }

    public String getSe_channelName() {
        return se_channelName;
    }

    public void setSe_channelName(String se_channelName) {
        this.se_channelName = se_channelName;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public PosBusinessType getPosBusinessType() {
        return posBusinessType;
    }

    public void setPosBusinessType(PosBusinessType posBusinessType) {
        this.posBusinessType = posBusinessType;
    }

    public Integer getPosBusinessTypeId() {
        return posBusinessTypeId;
    }

    public void setPosBusinessTypeId(Integer posBusinessTypeId) {
        this.posBusinessTypeId = posBusinessTypeId;
    }
}